<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <title>fragments/top-bar-second</title>
</head>

<body>
    <div class="top-bar-second" th:fragment="topBarSecond">
        <div class="top_bar_box">
            <div class="nav-left">
                <span class="nav-lef-wei">未来</span>
                <span class="nav-lef-text">头条</span>
            </div>
            <ul class="top_bar_ul">
                <li class="top_bar_li top_bar_li1" data-category="follows" id="2">关注</li>
                <li class="top_bar_li top_bar_li2" data-category="recommend" id="1">推荐</li>
                <li class="top_bar_li top_bar_li3" data-category="finance" id="3">财经</li>
                <li class="top_bar_li top_bar_li4" data-category="technology" id="4">科技</li>
                <li class="top_bar_li top_bar_li5" data-category="hot" id="5">热点</li>
                <li class="top_bar_li top_bar_li6" data-category="military" id="6">军事</li>
                <li class="top_bar_li top_bar_li7" data-category="sports" id="7">体育</li>
            </ul>
            <div style="flex-grow: 1;"></div>
            <form action="/SearchController/search" method="get" class="top_bar_search_box">
                <input type="text" name="searchString" th:value="${searchString}">
                <button class="search_button" type="submit">
                    <i class="iconfont icon-sousuo"></i>
                    <span>搜索</span>
                </button>
            </form>
            <div class="top_bar_NAP">
                <!--            <div class="top_bar_news" style="position: relative;">-->
                <!--                <a class="top_bar_news_box" href="">-->
                <!--                    <div class="red_point"></div>-->
                <!--                    <i class="iconfont icon-chuangzuo"></i>-->
                <!--                    <span>创作中心</span>-->
                <!--                </a>-->
                <!--                <ul class="news_dropdown">-->
                <!--                    <li>消息私信</li>-->
                <!--                    <li>评论和@</li>-->
                <!--                    <li>粉丝</li>-->
                <!--                    <li>点赞</li>-->
                <!--                </ul>-->
            </div>
            <div class="top_bar_publish" style="position: relative;">
                <a href="" class="top_bar_publish_box">
                    <i class="iconfont icon-jiahao"></i>
                    <span>发布</span>
                </a>
                <ul class="publish_dropdown">
                    <li class="dopostEssay">写文章</li>
                    <li class="dopostEssay">发微头条</li>
                </ul>
            </div>
            <div class="top-bar-personal" style="position: relative;">
                <div class="login-area">
                    <div class="logining" th:if="${userInfo==null}">
                        <span class="login-btn">登录</span>
                    </div>
                    <div class="no-login" th:if="${userInfo!=null}">
                        <a class="top-bar-personal-image">
                            <img th:src="${userInfo.avatar}" alt="头像" class="profiles" width="30px" height="30px">
                        </a>
                        <ul class="personal-dropdown">
                            <li class="personal-enter">个人中心</li>
                            <li class="creator-Center">创作中心</li>
                            <li class="login-out">退出登录</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    </div>
    <script src="../../static/js/login.js"></script>

</body>

</html>